import { createSlice } from "@reduxjs/toolkit";
import dayjs from "dayjs";
const counterSlice = createSlice({
  name: "counter",
  initialState: {
    form: "合肥",
    to: "南京",
    data:dayjs().format('YYYY-MM-DD')
  },
  reducers: {
    useTm(state,action) {
        state.data=action.payload
    },
  },
});
export default counterSlice.reducer;
export const { useTm } = counterSlice.actions;
